<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>test-timer</title>
<script type="text/javascript">
	var PAGE = {
		baseURL : "file:///E:/douxy/git/twotiger_customer/WebContent/",
		nid : "index",
		category : "index",
		v : 20150610
	//其它config 信息
	}
</script>
<script src="../jquery-1.8.2.min.js?v=20150610"></script>
<script src="../util.js?v=20150610"></script>
<script src="../require.js?v=20150610"></script>
<script type="text/javascript" src="../app.js?v=20150610"></script>
</head>
<body>
	<div id="btns">
	<button   onclick="window._TT.login()"id="login">login</button>

	<button onclick="window._TT.logout()"id="logout" >logout</button>
	
	<button onclick="window._TT.getUserStatus()"id="getUserStatus">用户状态</button>

	<button onclick="window._TT.getUserinfo()"id="getUserInfo">用户信息</button>

	<button onclick="window._TT.getNetinfo()"id="getNetInfo">网络信息</button>

	<button onclick="window._TT.toProDetail('255')"id="toProDetail">打开项目详情</button>

	<button onclick="window._TT.toPage(3)"id="toProDetail">打开项目列表</button>
	<button onclick="window._TT.userInfo()"id="toProDetail">用户信息</button>
	<button onclick="window._TT.toProjectDetail('0','12','21')">打开项目详情</button>
	<button onclick="window._TT.toShare('我在两只老虎日进斗金，怎能不叫上你！','来两只老虎理财，坐享15%的年化收益与万元体验金！','http://a.app.qq.com/o/simple.jsp?pkgname=app.twotiger.p2p','/resource/app/img/share.png')">打开分享</button>
	</div>
	<script type="text/javascript">
	require(['app'],function(app){
		$("#btns button").on('click',function(){
			$this=$(this);
			
			app[$this.attr("id")]&&app[$this.attr("id")]()
		})
	})

	function getNetinfo(c){
		var i=JSON.stringify(c)
			alert(i);
	};
	function getUserinfo(b){
		var i=JSON.stringify(b)
			alert(i);
	};
	function getUserStatus(a){
		
			alert(a);
	};
	function userInfoCallBack(b){
	
		alert(b);
		
		if(isEmptyObject(b)){  
			
		}else{
			alert(b["name"] + b["phone"]);
		}
		
		var i=JSON.stringify(b)    // b对象为json对象，此处将b转为string
		alert(i);
		//var obj=JSON.parse(i);   // b对象为json对象，此处将i转为json对象
	};
	
	function isEmptyObject(obj){   //判断传过来的json串是否为空
		for(var n in obj){
			return false;
		}
		return true;
	}
	</script>
	
</body>
</html>